//
//  webViewController.m
//  maocuhuiOASystem
//
//  Created by michael on 16/4/6.
//  Copyright © 2016年 czd. All rights reserved.
//

#import "webViewController.h"

@interface webViewController ()

@end

@implementation webViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    _webview = [[UIWebView alloc]initWithFrame:CGRectMake(0,0,KScreenWidth,KScreenHeight)];
      _webview.delegate=self;
      _webview.scalesPageToFit = YES;
      [self.view addSubview:_webview];
        NSURL *url = [NSURL URLWithString:self.url];

  [_webview loadRequest:[NSURLRequest requestWithURL:url]];

    
}
- (void)webViewDidFinishLoad:(UIWebView *)webView{


//NSLog(@"11");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
    UIAlertView *alterview = [[UIAlertView alloc] initWithTitle:@"" message:[error localizedDescription]  delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
    [alterview show];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
